<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户管理</title>
<link href="<?php echo base_url() ?>css/base.css" type="text/css" rel="stylesheet" />
<link href="<?php echo base_url() ?>css/common.css" type="text/css" rel="stylesheet" />
<link href="<?php echo base_url() ?>css/pages.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo base_url() ?>js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="<?php echo base_url() ?>js/Clock.js"></script>
<!--[if IE 6]><script type="text/javascript" src="<?php echo base_url() ?>js/pngfix.js"></script><![endif]-->
<script type="text/javascript" src="<?php echo base_url() ?>js/menu.js"></script>
<script type="text/javascript">
	function tp(){
		window.location.href = document.form1.url.value + document.form1.pagenum.value;
	}
	function subret(){
		if(confirm('确定要删除所选信息？')){
			return;
		}
		return false;
	}
	function selsc(){
		var chk = document.getElementsByName("did[]");
		for(var i=0;i<chk.length;i++) {
			var temp=chk[i];
			temp.checked=!temp.checked;
		}
	}
</script>
</head>

<body>
<div class="oaindex">
	<?php include 'system_header.php' ?>
    <div class="clearfix">
        <?php include 'system_left.php' ?>
		
		<!-- -----------------------------------编辑区---------------------------------- -->
		
        <div class="right_box"><form name="form1" action="/index.php/user/del/" method="post" onsubmit="return subret()">
            <div class="the_current">
				<span></span>
				<p>当前位置：首页&nbsp;&nbsp;>>&nbsp;&nbsp;用户管理</p>
            </div>
			<div class="sheet clearfix">
				<table width="740" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <th width="41"><input name="" type="checkbox" onclick="selsc()" /></th>
                    <th width="196">用户名</th>
                    <th width="183">职位</th>
                    <th width="165">创建时间</th>
                    <th width="155">操作</th>
                  </tr>
				  <?php foreach($list as $user){ ?>
                  <tr>
                    <td><input name="did[]" type="checkbox" value="<?php echo $user['id'] ?>" /></td>
                    <td style="text-align:left; padding-left:10px">[ <?php echo $user['name'] ?> ] <?php echo $user['username'] ?></td>
                    <td><?php echo $user['position'] ?></td>
                    <td><?php echo date('Y-m-d H:i', $user['addtime']) ?></td>
                    <td class="handle">
						<a href="/index.php/user/edit/<?php echo $user['id'] ?>">修改</a>
						<a href="/index.php/user/del/<?php echo $user['id'] ?>" onclick="return subret()">删除</a>
					</td>
                  </tr>
				  <?php } ?>
                </table>
				 <p class="whol_button"><input name="submit" type="submit" value="批量删除" /></p>
			</div>
			<p class="page">
				<?php echo $page ?>
				<span>到</span><input type="text" name="pagenum" value="<?php echo $pagenum ?>" /><span>页</span>
				<input type="button" class="ok_button" value="确定" onclick="tp()" />
				<input type="hidden" name="url" value="/index.php/user/index/<?php echo $id ?>/">
			</p>
            </form>
        </div>
		
		<!-- -----------------------------------编辑区---------------------------------- -->
		
    </div>
    <?php include 'system_footer.php' ?>
</div>

</body>
</html>
